package business.global.pk.ddz.cardtype.type;

import business.ddz.c2s.cclass.DDZ_define;
import business.global.pk.alg.params.BaseOpCard;
import business.global.pk.alg.params.BasePKParameter;
import business.global.pk.alg.type.Type_Rocket;
import business.global.pk.ddz.cardtype.util.DDZALGUtil;

import java.util.ArrayList;

/**
 * 火箭
 */
public class DDZRocket extends Type_Rocket<DDZALGUtil> {

    //3A炸可以压所有的牌型
    @Override
    public BaseOpCard getCardList(BasePKParameter parameter) {
        if (parameter.getCloneOpTypeCardList().containsAll(getBasePKALGUtil().getRocketCard())) { //火箭最大
            return BaseOpCard.make(DDZ_define.DDZ_CARD_TYPE.DDZ_CARD_TYPE_ZHADAN.value(), 0, new ArrayList<>(getBasePKALGUtil().getRocketCard()));
        }
        return null;
    }

    @Override
    public BaseOpCard checkCardList(BasePKParameter parameter) {
       return getCardList(parameter);
    }

    @Override
    public DDZALGUtil getBasePKALGUtil() {
        return DDZALGUtil.getInstance();
    }
}
